
<!DOCTYPE HTML>
<html lang="" >
    <head>
        <meta charset="UTF-8">
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <title>8.HTML 超链接 · GitBook</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="description" content="">
        <meta name="generator" content="GitBook 3.2.3">
        
        
        
    
    <link rel="stylesheet" href="../gitbook/style.css">

    
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-highlight/website.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-search/search.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-fontsettings/website.css">
                
            
        

    

    
        
    
        
    
        
    
        
    
        
    
        
    

        
    
    
    <meta name="HandheldFriendly" content="true"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../gitbook/images/apple-touch-icon-precomposed-152.png">
    <link rel="shortcut icon" href="../gitbook/images/favicon.ico" type="image/x-icon">

    
    <link rel="next" href="9-head.html" />
    
    
    <link rel="prev" href="7-textformat.html" />
    

    </head>
    <body>
        
<div class="book">
    <div class="book-summary">
        
            
<div id="book-search-input" role="search">
    <input type="text" placeholder="Type to search" />
</div>

            
                <nav role="navigation">
                


<ul class="summary">
    
    

    

    
        
        
    
        <li class="chapter " data-level="1.1" >
            
                <span>
            
                    
                    入门
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.1.1" data-path="../">
            
                <a href="../">
            
                    
                    0.HTML 介绍
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.1.2" data-path="1-introduce.html">
            
                <a href="1-introduce.html">
            
                    
                    1.HTML 简介
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.1.3" data-path="2-basice.html">
            
                <a href="2-basice.html">
            
                    
                    2.HTML 基础
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.2" >
            
                <span>
            
                    
                    基础
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.2.1" data-path="3-element.html">
            
                <a href="3-element.html">
            
                    
                    3.HTML 元素
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.2" data-path="4-attritube.html">
            
                <a href="4-attritube.html">
            
                    
                    4.HTML 属性
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.3" data-path="5-title.html">
            
                <a href="5-title.html">
            
                    
                    5.HTML 标题
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.4" data-path="6-paragraph.html">
            
                <a href="6-paragraph.html">
            
                    
                    6.HTML 段落
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.5" data-path="7-textformat.html">
            
                <a href="7-textformat.html">
            
                    
                    7.HTML 文本格式化
            
                </a>
            

            
        </li>
    
        <li class="chapter active" data-level="1.2.6" data-path="8-link.html">
            
                <a href="8-link.html">
            
                    
                    8.HTML 超链接
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.7" data-path="9-head.html">
            
                <a href="9-head.html">
            
                    
                    9.HTML head
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.8" data-path="10-css.html">
            
                <a href="10-css.html">
            
                    
                    10.HTML CSS
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.9" data-path="11-imgs.html">
            
                <a href="11-imgs.html">
            
                    
                    11.HTML 图片
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.10" data-path="12-tables.html">
            
                <a href="12-tables.html">
            
                    
                    12.HTML 表格
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.11" data-path="13-list.html">
            
                <a href="13-list.html">
            
                    
                    13.HTML 列表
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.12" data-path="14-block.html">
            
                <a href="14-block.html">
            
                    
                    14.HTML 区块
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.13" data-path="15-layouts.html">
            
                <a href="15-layouts.html">
            
                    
                    15.HTML 布局
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.3" >
            
                <span>
            
                    
                    其他
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.3.1" data-path="support.html">
            
                <a href="support.html">
            
                    
                    赞助/支持
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

    

    <li class="divider"></li>

    <li>
        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
            Published with GitBook
        </a>
    </li>
</ul>


                </nav>
            
        
    </div>

    <div class="book-body">
        
            <div class="body-inner">
                
                    

<div class="book-header" role="navigation">
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href=".." >8.HTML 超链接</a>
    </h1>
</div>




                    <div class="page-wrapper" tabindex="-1" role="main">
                        <div class="page-inner">
                            
<div id="book-search-results">
    <div class="search-noresults">
    
                                <section class="normal markdown-section">
                                
                                <h1 id="html-&#x94FE;&#x63A5;">HTML &#x94FE;&#x63A5;</h1>
<p>HTML &#x4F7F;&#x7528;&#x8D85;&#x7EA7;&#x94FE;&#x63A5;&#x4E0E;&#x7F51;&#x7EDC;&#x4E0A;&#x7684;&#x53E6;&#x4E00;&#x4E2A;&#x6587;&#x6863;&#x76F8;&#x8FDE;&#x3002;&#x51E0;&#x6237;&#x53EF;&#x4EE5;&#x5728;&#x6240;&#x6709;&#x7684;&#x9875;&#x9762;&#x4E2D;&#x627E;&#x5230;&#x94FE;&#x63A5;&#x3002;&#x70B9;&#x51FB;&#x94FE;&#x63A5;&#x53EF;&#x4EE5;&#x4ECE;&#x4E00;&#x5F20;&#x9875;&#x9762;&#x8DF3;&#x8F6C;&#x5230;&#x53E6;&#x4E00;&#x5F20;&#x9875;&#x9762;&#x3002;  </p>
<hr>
<h2 id="html-&#x8D85;&#x94FE;&#x63A5;&#xFF08;&#x94FE;&#x63A5;&#xFF09;">HTML &#x8D85;&#x94FE;&#x63A5;&#xFF08;&#x94FE;&#x63A5;&#xFF09;</h2>
<p>HTML &#x4F7F;&#x7528;&#x6807;&#x7B7E; <code>&lt;a&gt;</code> &#x6765;&#x8BBE;&#x7F6E;&#x8D85;&#x6587;&#x672C;&#x94FE;&#x63A5;&#x3002;  </p>
<p>&#x8D85;&#x94FE;&#x63A5;&#x53EF;&#x4EE5;&#x662F;&#x4E00;&#x4E2A;&#x5B57;&#xFF0C;&#x4E00;&#x4E2A;&#x8BCD;&#xFF0C;&#x6269;&#x6298;&#x4E00;&#x7EC4;&#x8BCD;&#xFF0C;&#x4E5F;&#x53EF;&#x4EE5;&#x662F;&#x4E00;&#x5E45;&#x56FE;&#x50CF;&#xFF0C;&#x4F60;&#x53EF;&#x4EE5;&#x70B9;&#x51FB;&#x8FD9;&#x4E9B;&#x5185;&#x5BB9;&#x6765;&#x8DF3;&#x8F6C;&#x5230;&#x65B0;&#x7684;&#x6587;&#x6863;&#x6216;&#x8005;&#x5F53;&#x524D;&#x6587;&#x6863;&#x4E2D;&#x7684;&#x67D0;&#x4E2A;&#x90E8;&#x5206;&#x3002;  </p>
<p>&#x5F53;&#x4F60;&#x628A;&#x9F20;&#x6807;&#x6307;&#x9488;&#x79FB;&#x52A8;&#x5230;&#x7F51;&#x9875;&#x4E2D;&#x7684;&#x67D0;&#x4E2A;&#x94FE;&#x63A5;&#x4E0A;&#x65F6;&#xFF0C;&#x7BAD;&#x5934;&#x4F1A;&#x53D8;&#x6210;&#x4E00;&#x53EA;&#x5C0F;&#x624B;&#x3002;  </p>
<p>&#x5728;&#x6807;&#x7B7E; <code>&lt;a&gt;</code> &#x4E2D;&#x4F7F;&#x7528; href &#x5C5E;&#x6027;&#x6765;&#x63CF;&#x8FF0;&#x94FE;&#x63A5;&#x7684;&#x5730;&#x5740;&#x3002;  </p>
<p>&#x5728;&#x9ED8;&#x8BA4;&#x60C5;&#x51B5;&#x4E0B;&#xFF0C;&#x94FE;&#x63A5;&#x5C06;&#x4EE5;&#x4E00;&#x4E0B;&#x5F62;&#x52BF;&#x51FA;&#x73B0;&#x5728;&#x6D4F;&#x89C8;&#x5668;&#x4E2D;&#xFF1A;  </p>
<ul>
<li>&#x4E00;&#x4E2A;&#x672A;&#x8BBF;&#x95EE;&#x8FC7;&#x7684;&#x94FE;&#x63A5;&#x663E;&#x793A;&#x4E3A;&#x84DD;&#x8272;&#x5B57;&#x4F53;&#x5E76;&#x5E26;&#x6709;&#x4E0B;&#x5212;&#x7EBF;&#x3002;  </li>
<li>&#x8BBF;&#x95EE;&#x8FC7;&#x7684;&#x94FE;&#x63A5;&#x663E;&#x793A;&#x4E3A;&#x7D2B;&#x8272;&#x5E76;&#x5E26;&#x6709;&#x4E0B;&#x5212;&#x7EBF;&#x3002;  </li>
<li>&#x70B9;&#x51FB;&#x94FE;&#x63A5;&#x65F6;&#xFF0C;&#x94FE;&#x63A5;&#x663E;&#x793A;&#x4E3A;&#x7EA2;&#x8272;&#x5E76;&#x5E26;&#x6709;&#x4E0B;&#x5212;&#x7EBF;&#x3002;  </li>
</ul>
<p><code>&#x6CE8;&#x610F;&#xFF1A;&#x5982;&#x679C;&#x4E3A;&#x8FD9;&#x4E9B;&#x8D85;&#x94FE;&#x63A5;&#x8BBE;&#x7F6E;&#x4E86; CSS &#x6837;&#x5F0F;&#xFF0C;&#x5C55;&#x793A;&#x6837;&#x5F0F;&#x4F1A;&#x6839;&#x636E; CSS &#x7684;&#x8BBE;&#x5B9A;&#x800C;&#x663E;&#x793A;&#x3002;</code>  </p>
<hr>
<h2 id="html-&#x94FE;&#x63A5;&#x8BED;&#x6CD5;">HTML &#x94FE;&#x63A5;&#x8BED;&#x6CD5;</h2>
<p>&#x94FE;&#x63A5;&#x7684; HTML &#x4EE3;&#x7801;&#x5F88;&#x7B80;&#x5355;&#x3002;&#x5B83;&#x7C7B;&#x4F3C;&#x8FD9;&#x6837;&#xFF1A;  </p>
<p><code>&lt;a href=&quot;url&quot;&gt;&#x94FE;&#x63A5;&#x6587;&#x672C;&lt;/a&gt;</code>  </p>
<p>href &#x5C5E;&#x6027;&#x63CF;&#x8FF0;&#x4E86;&#x94FE;&#x63A5;&#x7684;&#x76EE;&#x6807;&#x3002;  </p>
<hr>
<h2 id="html-&#x94FE;&#x63A5;---target-&#x5C5E;&#x6027;">HTML &#x94FE;&#x63A5; - target &#x5C5E;&#x6027;</h2>
<p>&#x4F7F;&#x7528; target &#x5C5E;&#x6027;&#xFF0C;&#x4F60;&#x53EF;&#x4EE5;&#x5B9A;&#x4E49;&#x88AB;&#x94FE;&#x63A5;&#x7684;&#x6587;&#x6863;&#x5728;&#x4F55;&#x5904;&#x663E;&#x793A;&#x3002;  </p>
<pre><code class="lang-html"><span class="hljs-comment">&lt;!-- &#x4E0B;&#x4F8B;&#x4E2D;&#xFF0C;&#x5C06;&#x5728;&#x65B0;&#x7684;&#x6807;&#x7B7E;&#x9875;&#x6253;&#x5F00;&#x94FE;&#x63A5;&#x5730;&#x5740; --&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">a</span> <span class="hljs-attr">href</span>=<span class="hljs-string">&quot;http://www.davidtien.xyz/onmyway/&quot;</span> <span class="hljs-attr">target</span>=<span class="hljs-string">&quot;_blank&quot;</span>&gt;</span>onmyway<span class="hljs-tag">&lt;/<span class="hljs-name">a</span>&gt;</span>
</code></pre>
<hr>
<h2 id="html-&#x94FE;&#x63A5;---id-&#x5C5E;&#x6027;">HTML &#x94FE;&#x63A5; - id &#x5C5E;&#x6027;</h2>
<p>id &#x5C5E;&#x6027;&#x53EF;&#x7528;&#x4E8E;&#x521B;&#x5EFA;&#x4E00;&#x4E2A; HTML &#x6587;&#x6863;&#x4E66;&#x7B7E;&#x6807;&#x8BB0;&#x3002;  </p>
<p><strong>&#x63D0;&#x793A;</strong>&#xFF1A;&#x4E66;&#x7B7E;&#x662F;&#x4E0D;&#x4EE5;&#x4EFB;&#x4F55;&#x7279;&#x6B8A;&#x7684;&#x65B9;&#x5F0F;&#x663E;&#x793A;&#xFF0C;&#x5728; HTML &#x6587;&#x6863;&#x4E2D;&#x4E0D;&#x662F;&#x663E;&#x793A;&#x7684;&#xFF0C;&#x6240;&#x4EE5;&#x5BF9;&#x4E8E;&#x8BFB;&#x8005;&#x6765;&#x8BF4;&#x662F;&#x9690;&#x85CF;&#x7684;&#x3002;  </p>
<pre><code class="lang-html"># &#x5728; HTML &#x6587;&#x6863;&#x4E2D;&#x63D2;&#x5165; ID&#xFF1A;  
<span class="hljs-tag">&lt;<span class="hljs-name">a</span> <span class="hljs-attr">id</span>=<span class="hljs-string">&quot;tipe&quot;</span>&gt;</span>&#x6709;&#x7528;&#x7684;&#x4FE1;&#x606F;<span class="hljs-tag">&lt;/<span class="hljs-name">a</span>&gt;</span>

# &#x5728; HTML &#x6587;&#x6863;&#x4E2D;&#x521B;&#x5EFA;&#x4E00;&#x4E2A;&#x94FE;&#x63A5;&#x5230;&#x201C;&#x6709;&#x7528;&#x7684;&#x4FE1;&#x606F;&#x201D;&#x90E8;&#x5206;&#xFF08;id=&quot;tipe&quot;&#xFF09;:
<span class="hljs-tag">&lt;<span class="hljs-name">a</span> <span class="hljs-attr">href</span>=<span class="hljs-string">&quot;#tipe&quot;</span>&gt;</span>&#x8BBF;&#x95EE;&#x6709;&#x7528;&#x7684;&#x4FE1;&#x606F;<span class="hljs-tag">&lt;/<span class="hljs-name">a</span>&gt;</span>

# &#x6216;&#x8005;&#xFF0C;&#x4ECE;&#x53E6;&#x4E00;&#x4E2A;&#x9875;&#x9762;&#x521B;&#x5EFA;&#x4E00;&#x4E2A;&#x94FE;&#x63A5;&#x5230;&#x201C;&#x6709;&#x7528;&#x7684;&#x4FE1;&#x606F;&#x201D;&#xFF08;id=&quot;tipe&quot;&#xFF09;:
<span class="hljs-tag">&lt;<span class="hljs-name">a</span> <span class="hljs-attr">href</span>=<span class="hljs-string">&quot;http://www.davidtien.xyz/notes/html#tips&quot;</span>&gt;</span>&#x8BBF;&#x95EE;&#x6709;&#x7528;&#x7684;&#x4FE1;&#x606F;<span class="hljs-tag">&lt;/<span class="hljs-name">a</span>&gt;</span>
</code></pre>
<hr>
<h2 id="&#x57FA;&#x672C;&#x7684;&#x6CE8;&#x610F;&#x4E8B;&#x9879;---&#x6709;&#x7528;&#x7684;&#x63D0;&#x793A;">&#x57FA;&#x672C;&#x7684;&#x6CE8;&#x610F;&#x4E8B;&#x9879; - &#x6709;&#x7528;&#x7684;&#x63D0;&#x793A;</h2>
<p><strong>&#x6CE8;&#x91CA;</strong>&#xFF1A;<br>&#x8BF7;&#x59CB;&#x7EC8;&#x5C06;&#x6B63;&#x659C;&#x6760;&#x6DFB;&#x52A0;&#x5230;&#x5B50;&#x6587;&#x4EF6;&#x5939;&#x3002;<br>&#x52A0;&#x5165;&#x8FD9;&#x6837;&#x4E66;&#x5199;&#x94FE;&#x63A5;&#xFF1A;<br><code>href=&quot;http://www.davidtien.xyz/html&quot;</code>  &#xFF0C;&#x5C31;&#x4F1A;&#x5411;&#x670D;&#x52A1;&#x5668;&#x4EA7;&#x751F;&#x4E24;&#x6B21; HTTP &#x8BF7;&#x6C42;&#x3002;<br>&#x8FD9;&#x662F;&#x56E0;&#x4E3A;&#x670D;&#x52A1;&#x5668;&#x4F1A;&#x6DFB;&#x52A0;&#x6B63;&#x659C;&#x6760;&#x5230;&#x8FD9;&#x4E2A;&#x5730;&#x5740;&#xFF0C;&#x7136;&#x540E;&#x521B;&#x5EFA;&#x4E00;&#x4E2A;&#x65B0;&#x7684;&#x8BF7;&#x6C42;&#xFF0C;&#x5C31;&#x60F3;&#x8FD9;&#x6837;&#xFF1A;<br><code>href=&quot;http://www.davidtien.xyz/html/&quot;</code>  </p>
<hr>
<h2 id="html-&#x94FE;&#x63A5;&#x6807;&#x7B7E;">HTML &#x94FE;&#x63A5;&#x6807;&#x7B7E;</h2>
<table>
<thead>
<tr>
<th style="text-align:center">&#x6807;&#x7B7E;</th>
<th style="text-align:center">&#x63CF;&#x8FF0;</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:center"><code>&lt;a&gt;</code></td>
<td style="text-align:center">&#x5B9A;&#x4E49;&#x4E00;&#x4E2A;&#x8D85;&#x94FE;&#x63A5;</td>
</tr>
</tbody>
</table>

                                
                                </section>
                            
    </div>
    <div class="search-results">
        <div class="has-results">
            
            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
            <ul class="search-results-list"></ul>
            
        </div>
        <div class="no-results">
            
            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
            
        </div>
    </div>
</div>

                        </div>
                    </div>
                
            </div>

            
                
                <a href="7-textformat.html" class="navigation navigation-prev " aria-label="Previous page: 7.HTML 文本格式化">
                    <i class="fa fa-angle-left"></i>
                </a>
                
                
                <a href="9-head.html" class="navigation navigation-next " aria-label="Next page: 9.HTML head">
                    <i class="fa fa-angle-right"></i>
                </a>
                
            
        
    </div>

    <script>
        var gitbook = gitbook || [];
        gitbook.push(function() {
            gitbook.page.hasChanged({"page":{"title":"8.HTML 超链接","level":"1.2.6","depth":2,"next":{"title":"9.HTML head","level":"1.2.7","depth":2,"path":"docs/9-head.md","ref":"./docs/9-head.md","articles":[]},"previous":{"title":"7.HTML 文本格式化","level":"1.2.5","depth":2,"path":"docs/7-textformat.md","ref":"./docs/7-textformat.md","articles":[]},"dir":"ltr"},"config":{"gitbook":"*","theme":"default","variables":{},"plugins":["livereload"],"pluginsConfig":{"livereload":{},"highlight":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"}},"file":{"path":"docs/8-link.md","mtime":"2020-07-14T12:20:44.531Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2020-07-14T15:48:00.710Z"},"basePath":"..","book":{"language":""}});
        });
    </script>
</div>

        
    <script src="../gitbook/gitbook.js"></script>
    <script src="../gitbook/theme.js"></script>
    
        
        <script src="../gitbook/gitbook-plugin-livereload/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-search/search-engine.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-search/search.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-lunr/lunr.min.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-lunr/search-lunr.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-sharing/buttons.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
        
    

    </body>
</html>

